﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class InStoreBillDtlService : IEntityService<InStoreBillDtl, InStoreBillDtlService>
    {

        #region IEntityService<InStoreBillDtl> Members

        public List<InStoreBillDtl> GetEntityList()
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<InStoreBillDtl> list = sc.GetInStoreBillDtls();
            foreach (var inStoreBillDtl in list)
            {
                inStoreBillDtl.BindPropertyChanged();
            }
            return list;
        }

        public List<InStoreBillDtl> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<InStoreBillDtl> list = sc.GetInStoreBillDtlsByCondition(condition);
            foreach (var inStoreBillDtl in list)
            {
                inStoreBillDtl.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<InStoreBillDtl> list)
        {
            throw new NotFiniteNumberException();
        }

        public InStoreBillDtl GetEntity(string key)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
